package com.itheima.webaitliasserver.controller;

import com.itheima.webaitliasserver.pojo.EmpGender;
import com.itheima.webaitliasserver.pojo.EmpJobOption;
import com.itheima.webaitliasserver.pojo.Result;
import com.itheima.webaitliasserver.service.ReportService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.Mapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName: xiaoZhang
 * @Description:
 * @Author: Zhang
 * @CreateDate: 2025-09-04 20:49
 */
@Slf4j
@RequestMapping("/report")
@RestController
public class ReportController {
    @Autowired
    private ReportService reportService;
    @GetMapping("/empJobData")
    public Result countEmpJobDataHandler() {

        return  Result.success( reportService.getEmpJobDataService());
    }

    @GetMapping("/empGenderData")
    public  Result countEmpGenderHandler() {
        List<EmpGender> empGenderDataList = reportService.getEmpGenderDataService();

        return  Result.success(empGenderDataList);
    }

}
